package Filter.impl;

import Filter.service.Criteria;
import Filter.entity.Person;

import java.util.List;
import java.util.stream.Collectors;

/**
 * @author chengjunjie
 * @date 2025-09-10
 */

public class FemaleCriteria implements Criteria {

    @Override
    public List<Person> filter(List<Person> personList) {
        return personList.stream()
                .filter(person -> "女".equals(person.getGender()))
                .collect(Collectors.toList());
    }
}
